3.1281 \(\int \frac{\tan ^{-1}(x) \log (1+x^2)}{x^2} \, dx\)

Optimal. Leaf size=41 \[ -\frac{1}{2} \text{PolyLog}\left (2,-x^2\right )-\frac{1}{4} \log ^2\left (x^2+1\right )-\frac{\log \left (x^2+1\right ) \tan ^{-1}(x)}{x}+\tan ^{-1}(x)^2 \]

[Out]

ArcTan[x]^2 - (ArcTan[x]*Log[1 + x^2])/x - Log[1 + x^2]^2/4 - PolyLog[2, -x^2]/2

________________________________________________________________________________________

Rubi [A]  time = 0.125174, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 12, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 1., Rules used = {4852, 266, 36, 29, 31, 5017, 2475, 2410, 2390, 2301, 2391, 4884} \[ -\frac{1}{2} \text{PolyLog}\left (2,-x^2\right )-\frac{1}{4} \log ^2\left (x^2+1\right )-\frac{\log \left (x^2+1\right ) \tan ^{-1}(x)}{x}+\tan ^{-1}(x)^2 \]

Antiderivative was successfully verified.

[In]

Int[(ArcTan[x]*Log[1 + x^2])/x^2,x]

[Out]

ArcTan[x]^2 - (ArcTan[x]*Log[1 + x^2])/x - Log[1 + x^2]^2/4 - PolyLog[2, -x^2]/2

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 5017

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_.) + Log[(f_.) + (g_.)*(x_)^2]*(e_.))*(x_)^(m_.), x_Symbol] :> Simp
[(x^(m + 1)*(d + e*Log[f + g*x^2])*(a + b*ArcTan[c*x]))/(m + 1), x] + (-Dist[(b*c)/(m + 1), Int[(x^(m + 1)*(d
+ e*Log[f + g*x^2]))/(1 + c^2*x^2), x], x] - Dist[(2*e*g)/(m + 1), Int[(x^(m + 2)*(a + b*ArcTan[c*x]))/(f + g*
x^2), x], x]) /; FreeQ[{a, b, c, d, e, f, g}, x] && ILtQ[m/2, 0]

Rule 2475

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rule 2410

Int[(Log[(c_.)*((d_) + (e_.)*(x_))]*(x_)^(m_.))/((f_) + (g_.)*(x_)), x_Symbol] :> Int[ExpandIntegrand[Log[c*(d
 + e*x)], x^m/(f + g*x), x], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[e*f - d*g, 0] && EqQ[c*d, 1] && IntegerQ[m
]

Rule 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4884

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rubi steps

\begin{align*} \int \frac{\tan ^{-1}(x) \log \left (1+x^2\right )}{x^2} \, dx &=-\frac{\tan ^{-1}(x) \log \left (1+x^2\right )}{x}+2 \int \frac{\tan ^{-1}(x)}{1+x^2} \, dx+\int \frac{\log \left (1+x^2\right )}{x \left (1+x^2\right )} \, dx\\ &=\tan ^{-1}(x)^2-\frac{\tan ^{-1}(x) \log \left (1+x^2\right )}{x}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{\log (1+x)}{x (1+x)} \, dx,x,x^2\right )\\ &=\tan ^{-1}(x)^2-\frac{\tan ^{-1}(x) \log \left (1+x^2\right )}{x}+\frac{1}{2} \operatorname{Subst}\left (\int \left (\frac{\log (1+x)}{-1-x}+\frac{\log (1+x)}{x}\right ) \, dx,x,x^2\right )\\ &=\tan ^{-1}(x)^2-\frac{\tan ^{-1}(x) \log \left (1+x^2\right )}{x}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{\log (1+x)}{-1-x} \, dx,x,x^2\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,x^2\right )\\ &=\tan ^{-1}(x)^2-\frac{\tan ^{-1}(x) \log \left (1+x^2\right )}{x}-\frac{\text{Li}_2\left (-x^2\right )}{2}-\frac{1}{2} \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,1+x^2\right )\\ &=\tan ^{-1}(x)^2-\frac{\tan ^{-1}(x) \log \left (1+x^2\right )}{x}-\frac{1}{4} \log ^2\left (1+x^2\right )-\frac{\text{Li}_2\left (-x^2\right )}{2}\\ \end{align*}

Mathematica [A]  time = 0.0097258, size = 41, normalized size = 1. \[ -\frac{1}{2} \text{PolyLog}\left (2,-x^2\right )-\frac{1}{4} \log ^2\left (x^2+1\right )-\frac{\log \left (x^2+1\right ) \tan ^{-1}(x)}{x}+\tan ^{-1}(x)^2 \]

Antiderivative was successfully verified.

[In]

Integrate[(ArcTan[x]*Log[1 + x^2])/x^2,x]

[Out]

ArcTan[x]^2 - (ArcTan[x]*Log[1 + x^2])/x - Log[1 + x^2]^2/4 - PolyLog[2, -x^2]/2

________________________________________________________________________________________

Maple [F]  time = 1.354, size = 0, normalized size = 0. \begin{align*} \int{\frac{\arctan \left ( x \right ) \ln \left ({x}^{2}+1 \right ) }{{x}^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctan(x)*ln(x^2+1)/x^2,x)

[Out]

int(arctan(x)*ln(x^2+1)/x^2,x)

________________________________________________________________________________________

Maxima [A]  time = 1.47988, size = 78, normalized size = 1.9 \begin{align*} -{\left (\frac{\log \left (x^{2} + 1\right )}{x} - 2 \, \arctan \left (x\right )\right )} \arctan \left (x\right ) - \arctan \left (x\right )^{2} + \frac{1}{2} \, \log \left (-x^{2}\right ) \log \left (x^{2} + 1\right ) - \frac{1}{4} \, \log \left (x^{2} + 1\right )^{2} + \frac{1}{2} \,{\rm Li}_2\left (x^{2} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(x)*log(x^2+1)/x^2,x, algorithm="maxima")

[Out]

-(log(x^2 + 1)/x - 2*arctan(x))*arctan(x) - arctan(x)^2 + 1/2*log(-x^2)*log(x^2 + 1) - 1/4*log(x^2 + 1)^2 + 1/
2*dilog(x^2 + 1)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\arctan \left (x\right ) \log \left (x^{2} + 1\right )}{x^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(x)*log(x^2+1)/x^2,x, algorithm="fricas")

[Out]

integral(arctan(x)*log(x^2 + 1)/x^2, x)

________________________________________________________________________________________

Sympy [C]  time = 87.8367, size = 37, normalized size = 0.9 \begin{align*} - \frac{\log{\left (x^{2} + 1 \right )}^{2}}{4} + \operatorname{atan}^{2}{\left (x \right )} - \frac{\operatorname{Li}_{2}\left (x^{2} e^{i \pi }\right )}{2} - \frac{\log{\left (x^{2} + 1 \right )} \operatorname{atan}{\left (x \right )}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atan(x)*ln(x**2+1)/x**2,x)

[Out]

-log(x**2 + 1)**2/4 + atan(x)**2 - polylog(2, x**2*exp_polar(I*pi))/2 - log(x**2 + 1)*atan(x)/x

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\arctan \left (x\right ) \log \left (x^{2} + 1\right )}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(x)*log(x^2+1)/x^2,x, algorithm="giac")

[Out]

integrate(arctan(x)*log(x^2 + 1)/x^2, x)